<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Bootstrap CSS-->
    <link rel="stylesheet" href="../assets/vendor/bootstrap/css/bootstrap.css">
    <!-- Font Awesome CSS-->
    <link rel="stylesheet" href="../assets/vendor/font-awesome/css/font-awesome.min.css">
    <!-- Custom Font Icons CSS-->
    <link rel="stylesheet" href="../assets/css/font.css">
    <!-- theme stylesheet-->
    <link rel="stylesheet" href="../assets/css/style.default.css" id="theme-stylesheet">
    <!-- Custom stylesheet - for your changes-->
    <link rel="stylesheet" href="../assets/css/custom.css">
    <link rel="stylesheet" href="../assets/bootstrap/css/bootstrap-select.min.css">
    <title>个人中心</title>

</head>
<body>
<%@ include file="publicjsp/head.jsp" %>

<div class="d-flex align-items-stretch">
    <!-- Sidebar Navigation-->
    <nav id="sidebar">
        <!-- Sidebar Header-->
        <%@ include file="publicjsp/sideHeader.jsp" %>
        <!-- Sidebar Navidation Menus--><span class="heading">Main</span>
        <ul class="list-unstyled">
            <li><a href="${pageContext.request.contextPath}/view/gohome"> <i class="icon-home"></i>主页 </a></li>
            <li><a href="#userDropdown" data-toggle="collapse"> <i class="icon-windows"></i>用户列表</a>
                <ul id="userDropdown" class="collapse list-unstyled">
                    <li><a href="${pageContext.request.contextPath}/user/lookUser">查看用户</a></li>
                    <li><a href="${pageContext.request.contextPath}/user/myFocus">我关注的用户</a></li>
                    <li><a href="${pageContext.request.contextPath}/article/articleList">发布文章</a></li>
                    <li><a href="${pageContext.request.contextPath}/article/myArticleList">我的收藏</a></li>
                </ul>
            </li>
            <!--<li><a href="login.html"> <i class="icon-logout"></i>Login page </a></li>-->

            <li><a href="#depDropdown" data-toggle="collapse"> <i class="icon-windows2"></i>部门列表</a>
                <ul id="depDropdown" class="collapse list-unstyled ">
                    <li><a href="${pageContext.request.contextPath}/dept/departmentList">全部部门</a></li>
                    <li><a href="${pageContext.request.contextPath}/meet/meeting">会议系统</a></li>
                </ul>
            </li>

        </ul>

    </nav>
    <!-- Sidebar Navigation end-->
    <div class="page-content">
        <div class="page-header">
            <div class="container-fluid">
                <h2 class="h5 no-margin-bottom">个人中心</h2>
            </div>
        </div>
        <section class="no-padding-bottom">
            <!-- Form Elements -->
            <div class="col-lg-12">
                <div class="block">
                    <div class="title"><strong>我的头像</strong></div>
                    <div class="avatar">
                        <c:if test="${requestScope.detailInfo.pic == null}">
                            <img id="myPic" src="../assets/img/avatar-6.jpg" alt="加载中..." style="width: 150px;height: 150px"
                                 class="img-thumbnail rounded-circle">
                        </c:if>
                        <c:if test="${requestScope.detailInfo.pic != null}">
                            <img id="myPic" src="${requestScope.detailInfo.pic}" alt="加载中..." style="width: 150px;height: 150px"
                                 class="img-thumbnail rounded-circle">
                        </c:if>
                    </div>
                    <div style="margin-top: 15px" class="text-left">
                        <!-- 用于展示上传文件名的表单 -->
                        <input id="showname" onclick="makeThisfile()" type="button" class="btn btn-primary"
                               value="更换头像">
                        <!-- 真正的文件上传表单 -->
                        <input name="realFile" type="file" id="myFile" style="display: none"/>
                    </div>
                    <div class="title">
                        <br>
                        <p class="h5">
                            <strong>关注数：</strong><span>&nbsp;</span><span>&nbsp;</span><span>${requestScope.detailInfo.follows}</span>
                        </p>
                        <br>
                        <p class="h5">
                            <strong>被看数：</strong><span>&nbsp;</span><span>&nbsp;</span><span>${requestScope.detailInfo.look}</span>
                        </p>
                        <br>
                    </div>
                    <div class="title"><strong>我的数据</strong></div>
                    <div class="block-body">
                        <form class="form-horizontal" id="userInfoList">
                            <div class="form-group row">
                                <label class="col-sm-3 form-control-label">真实姓名</label>
                                <div class="col-sm-9">
                                    <input type="text" value="${requestScope.detailInfo.realName}" class="form-control" name="username">
                                </div>
                            </div>
                            <div class="line"></div>
                            <div class="form-group row">
                                <label class="col-sm-3 form-control-label">所属部门</label>
                                <div class="col-sm-9">
                                    <select class="selectpicker" data-live-search="true" name="dept">
                                        <option value="${requestScope.detailInfo.deptId}">${requestScope.detailInfo.deptName}</option>
                                        <c:forEach items="${requestScope.deptList}" var="dept">
                                            <c:if test="${dept.id != requestScope.detailInfo.deptId}">
                                                <option value="${dept.id}">${dept.name}</option>
                                            </c:if>
                                        </c:forEach>
                                    </select>
                                </div>
                            </div>
                            <div class="line"></div>
                            <div class="form-group row">
                                <label class="col-sm-3 form-control-label">电话</label>
                                <div class="col-sm-9">
                                    <input type="text" value="${requestScope.detailInfo.phone}" name="phone" class="form-control">
                                </div>
                            </div>
                            <div class="line"></div>
                            <div class="form-group row">
                                <label class="col-sm-3 form-control-label">年龄</label>
                                <div class="col-sm-9">
                                    <input type="text" value="${requestScope.detailInfo.age}" class="form-control" name="age">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-3 form-control-label">性别 </label>
                                <div class="col-sm-9">

                                    <div class="i-checks">
                                        <c:if test="${requestScope.detailInfo.gender == 0}">
                                            <input checked="checked" id="radioCustom1" type="radio" value="0" name="sex"
                                                   class="radio-template">
                                            <label for="radioCustom1">男</label>
                                            <span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
                                            <input id="radioCustom2" type="radio" value="1" name="sex"
                                                   class="radio-template">
                                            <label for="radioCustom2">女</label>
                                        </c:if>

                                        <c:if test="${requestScope.detailInfo.gender == 1}">
                                            <input id="radioCustom1" type="radio" value="0" name="sex"
                                                   class="radio-template">
                                            <label for="radioCustom1">男</label>
                                            <span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
                                            <input checked="checked" id="radioCustom2" type="radio" value="1" name="sex"
                                                   class="radio-template">
                                            <label for="radioCustom2">女</label>
                                        </c:if>

                                        <c:if test="${requestScope.detailInfo.gender == null}">
                                            <input id="radioCustom1" type="radio" value="0" name="sex"
                                                   class="radio-template">
                                            <label for="radioCustom1">男</label>
                                            <span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
                                            <input id="radioCustom2" type="radio" value="1" name="sex"
                                                   class="radio-template">
                                            <label for="radioCustom2">女</label>
                                        </c:if>

                                    </div>
                                </div>


                            </div>
                            <div class="line"></div>
                            <div class="form-group row">
                                <label class="col-sm-3 form-control-label">注册时间</label>
                                <div class="col-sm-9">
                                    <input type="text" disabled="" value="${requestScope.detailInfo.registerTime}"
                                           placeholder="2019-10-30 09:30:00" class="form-control">
                                </div>
                            </div>
                            <div class="line"></div>
                            <div class="form-group row">
                                <label class="col-sm-3 form-control-label">登录时间</label>
                                <div class="col-sm-9">
                                    <input type="text" disabled="" value="${requestScope.detailInfo.loginTime}"
                                           placeholder="2019-10-30 19:30:00" class="form-control">
                                </div>
                            </div>
                            <div class="line"></div>

                            <div class="form-group row">
                                <label class="col-sm-3 form-control-label">是否私密 <br>
                                    <small class="text-primary">默认为否，可以不设置</small>
                                </label>
                                <div class="col-sm-9">
                                    <div class="i-checks">

                                        <c:if test="${requestScope.detailInfo.isSecret == 0}">
                                            <input id="checkboxCustom1" type="checkbox"  class="checkbox-template" name="secret">
                                            <label for="checkboxCustom1">是否私密</label>
                                        </c:if>

                                        <c:if test="${requestScope.detailInfo.isSecret == 1}">
                                            <input checked="checked" id="checkboxCustom1" type="checkbox" class="checkbox-template" name="secret">
                                            <label for="checkboxCustom1">是否私密</label>
                                        </c:if>


                                        <c:if test="${requestScope.detailInfo.isSecret == null}">
                                            <input id="checkboxCustom1" type="checkbox" class="checkbox-template" name="secret">
                                            <label for="checkboxCustom1">是否私密</label>
                                        </c:if>
                                    </div>

                                </div>
                            </div>
                            <div class="line"></div>
                            <div class="text-center">
                                <input type="submit" class="btn btn-primary" value="保存" id="userInfo" onclick="return false">
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </section>
        <%@ include file="publicjsp/footer.jsp" %>
    </div>
</div>

<!-- JavaScript files-->
<script src="../assets/vendor/jquery/jquery.min.js"></script>
<script src="../assets/bootstrap/js/bootstrap-select.min.js"></script>
<script src="../assets/vendor/popper.js/umd/popper.min.js"></script>
<script src="../assets/vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="../assets/vendor/jquery.cookie/jquery.cookie.js"></script>
<script src="../assets/vendor/chart.js/Chart.min.js"></script>
<script src="../assets/vendor/jquery-validation/jquery.validate.min.js"></script>
<script src="../assets/js/charts-home.js"></script>
<script src="../assets/js/front.js"></script>
<script src="../assets/js/custom.js"></script>
</body>
</html>